//
//  MVConllectionList.m
//  __PRODUCTNAME__
//
//  Created by QC.L on 16/08/15
//  Copyright (c) __ORGANIZATIONNAME__. All rights reserved.
//

#import "MVConllectionList.h"
#import "MVSingers.h"

@implementation MVConllectionList

+ (NSDictionary *)objectClassInArray{
    return @{@"singers" : [MVSingers class]};
}

-(void)setValue:(id)value forKey:(NSString *)key {

    [super setValue:value forKey:key];
    
    if ([key isEqualToString:@"singers"]) {
        
        NSMutableArray<MVSingers *> *singerArray = [NSMutableArray array];
        for (NSDictionary *singerDic in value) {
            
            MVSingers *singer = [MVSingers baseModelWithDic:singerDic];
            [singerArray addObject:singer];
        }
        _singers = singerArray;
    }
}

@end
